package org.example.aop.aspect;


import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;


@Order(3)
@Slf4j
@Component
@Aspect
public class AspectDemo3 {


    @Around("org.example.aop.aspect.AspectDemo2.pt()")
    //建议不要使用void，使用void可能会出现显示结果的情况
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        log.info(" AspectDemo3 before around...");
        Object object =  joinPoint.proceed();
        log.info("AspectDemo3 after before...");
        return object;
    }


}
